package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.InventoryCheckMapper;
import com.ruoyi.system.domain.InventoryCheck;
import com.ruoyi.system.service.IInventoryCheckService;

/**
 * 库存盘点 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-06-01
 */
@Service
public class InventoryCheckServiceImpl implements IInventoryCheckService
{
    @Autowired
    private InventoryCheckMapper inventoryCheckMapper;

    /**
     * 通过id查询库存盘点
     *
     * @param id 库存盘点主键
     * @return 库存盘点
     */
    @Override
    public InventoryCheck selectInventoryCheckById(Long id)
    {
        return inventoryCheckMapper.selectInventoryCheckById(id);
    }

    /**
     * 通过仓库名称查询库存盘点列表
     *
     * @param warehouseName 仓库名称
     * @return 库存盘点
     */
    @Override
    public List<InventoryCheck> selectInventoryCheckList(String warehouseName)
    {
        return inventoryCheckMapper.selectInventoryCheckList(warehouseName);
    }

    /**
     * 新增库存盘点
     *
     * @param inventoryCheck 库存盘点
     * @return 结果
     */
    @Override
    public int insertInventoryCheck(InventoryCheck inventoryCheck)
    {
        return inventoryCheckMapper.insertInventoryCheck(inventoryCheck);
    }

    /**
     * 修改库存盘点
     *
     * @param inventoryCheck 库存盘点
     * @return 结果
     */
    @Override
    public int updateInventoryCheck(InventoryCheck inventoryCheck)
    {
        return inventoryCheckMapper.updateInventoryCheck(inventoryCheck);
    }

    /**
     * 通过id批量删除库存盘点信息
     *
     * @param ids 需要删除的库存盘点主键
     * @return 结果
     */
    @Override
    public int deleteInventoryCheckByIds(Long[] ids)
    {
        return inventoryCheckMapper.deleteInventoryCheckByIds(ids);
    }

    /**
     * 通过id删除库存盘点信息
     *
     * @param id 库存盘点主键
     * @return 结果
     */
    @Override
    public int deleteInventoryCheckById(Long id)
    {
        return inventoryCheckMapper.deleteInventoryCheckById(id);
    }
}
